import React,{Component} from 'react'
import {Switch,Route,Redirect} from "react-router-dom";

import productHome from './producthome'
import productAddUpdate  from './add-update'
import productDetail from './detail'
/**
 * 商品分类
 */
export default class Product extends Component{

    render() {
        return(
            <Switch>
                {/*exact 路径完全匹配*/}
                <Route path='/product' component={productHome} exact/>
                <Route path='/product/addupdate' component={productAddUpdate}/>
                <Route path='/product/detail' component={productDetail}/>
                <Redirect to='/product'/>
            </Switch>
        )
    }
}